<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head lang="en">
<meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/customer_manage.css"/>
    <title>我的订货郎</title>
</head>
<body>
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 50px 0 213px;">
            <p class="brand">
                <a>客户</a>><a class="now">客户管理</a>
            </p>
            <div class="title-block">
                <form action="">
                    <div class="search-box fl">
                        <input type="text" placeholder="请输入客户名称/关键字" name="keywords"/>
                        <i class="search-btn fr" onclick="$('#submit-btn').click();"></i>
                        <input id="submit-btn" type="submit" style="display:none"/>
                    </div>
                    <div class="select-box fl">
                        <input name="customer-type" type="text" value="客户类型" readonly/>
                        <i class="fr">▼</i>
                        <ul class="list-box hide">
                            <li>一级代理商</li>
                            <li>二级代理商</li>
                            <li>三级代理商</li>
                            <li>普通用户</li>
                        </ul>
                    </div>
                    <div class="select-box fl">
                        <input name="state" type="text" value="账号状态" readonly/>
                        <i class="fr">▼</i>
                        <ul class="list-box hide">
                            <li>禁止</li>
                            <li>启用</li>
                        </ul>
                    </div>
                    <div class="area-select-box fl area">
                        <input name="customer-area" type="text" value="归属地区" readonly/>
                        <i class="fr">▼</i>
                        <ul class="list-box hide province">
                            <li>陕西</li>
                            <li>四川</li>
                            <li>江苏</li>
                            <li>浙江</li>
                            <li>上海</li>
                        </ul>
                        <ul class="list-box hide city">
                            <li>汉中</li>
                            <li>西安</li>
                            <li>延安</li>
                            <li>咸阳</li>
                            <li>商洛</li>
                        </ul>
                    </div>
                    <div class="add-customer fr">
                        <a href="${pageContext.request.contextPath}/customer/insert">新增客户</a>
                    </div>
                    <div class="btn-export fr">
                        导出
                    </div>
	                    <div class="btn-leading fr">
	                    	<a href="${pageContext.request.contextPath}/customer/import">导入</a>
	                    </div>
                </form>
            </div>
            <div class="table-box">
                <table>
                    <thead>
                        <tr>
                            <td>客户名称</td>
                            <td>登录账号</td>
                            <td>账号状态</td>
                            <td>客户类型</td>
                            <td>联系人</td>
                            <td>联系方式</td>
                            <td>归属地区</td>
                            <td>结算方式</td>
                            <td></td>
                        </tr>
                    </thead>
                    <tbody>
                    	<c:forEach var="Customer" items="${distributorCustomerDto}" >
                        <tr>
                            <td>${Customer.name }</td>
                            <td>${Customer.systemName }</td>
                            <c:if test="${Customer.isUse==1}">
                            	<td data-id="${Customer.dcId}"><a href="#" class="start-using using">启用</a></td>
                            </c:if>
                            <c:if test="${Customer.isUse==0}">
                            	<td data-id="${Customer.dcId}"><a href="#" class="start-using">禁用</a></td>
                            </c:if>
                            <td>${Customer.type }</td>
                            <td>${Customer.contact }</td>
                            <td>${Customer.tel }</td>
                            <td>${Customer.city }</td>
                            <td>${Customer.settlementType }</td>
                            <td>
                                <a href="${pageContext.request.contextPath}/customer/detail/${Customer.dcId}" ><button class="more">详情</button></a>
                                <a href="${pageContext.request.contextPath}/customer/update/${Customer.dcId}" ><button class="reverse">修改</button></a>
                                <button class="delete" data-id="${Customer.dcId}">删除</button>
                            </td>
                        </tr>
                        </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/customer_manage.js"></script>
        <!--内容部分结束-->
    </div>
</div>
</body>
</html>